package com.navi.loaddata.core.oracleEntity.array;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by ghost on 2018/3/17.
 */
@Entity
@Table(name = "ETL_ARRAY_IV_CURVE_V", schema = "EDALDR", catalog = "")
@IdClass(EtlArrayIvCurveVPK.class)
public class EtlArrayIvCurveV {
    private String stepId;
    private String glassId;
    private Date glassEndTime;
    private String paramCollection;
    private String paramName;
    private String siteName;
    private long seqNo;
    private long vd;
    private double vg;
    private double id;

    @Id
    @Column(name = "STEP_ID")
    public String getStepId() {
        return stepId;
    }

    public void setStepId(String stepId) {
        this.stepId = stepId;
    }

    @Id
    @Column(name = "GLASS_ID")
    public String getGlassId() {
        return glassId;
    }

    public void setGlassId(String glassId) {
        this.glassId = glassId;
    }

    @Id
    @Column(name = "GLASS_END_TIME")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getGlassEndTime() {
        return glassEndTime;
    }

    public void setGlassEndTime(Date glassEndTime) {
        this.glassEndTime = glassEndTime;
    }

    @Id
    @Column(name = "PARAM_COLLECTION")
    public String getParamCollection() {
        return paramCollection;
    }

    public void setParamCollection(String paramCollection) {
        this.paramCollection = paramCollection;
    }

    @Id
    @Column(name = "PARAM_NAME")
    public String getParamName() {
        return paramName;
    }

    public void setParamName(String paramName) {
        this.paramName = paramName;
    }

    @Id
    @Column(name = "SITE_NAME")
    public String getSiteName() {
        return siteName;
    }

    public void setSiteName(String siteName) {
        this.siteName = siteName;
    }

    @Id
    @Column(name = "SEQ_NO")
    public long getSeqNo() {
        return seqNo;
    }

    public void setSeqNo(long seqNo) {
        this.seqNo = seqNo;
    }

    @Id
    @Column(name = "VD")
    public long getVd() {
        return vd;
    }

    public void setVd(long vd) {
        this.vd = vd;
    }

    @Basic
    @Column(name = "VG")
    public double getVg() {
        return vg;
    }

    public void setVg(double vg) {
        this.vg = vg;
    }

    @Basic
    @Column(name = "ID")
    public double getId() {
        return id;
    }

    public void setId(double id) {
        this.id = id;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        EtlArrayIvCurveV that = (EtlArrayIvCurveV) o;

        if (seqNo != that.seqNo) return false;
        if (vd != that.vd) return false;
        if (vg != that.vg) return false;
        if (id != that.id) return false;
        if (stepId != null ? !stepId.equals(that.stepId) : that.stepId != null) return false;
        if (glassId != null ? !glassId.equals(that.glassId) : that.glassId != null) return false;
        if (glassEndTime != null ? !glassEndTime.equals(that.glassEndTime) : that.glassEndTime != null) return false;
        if (paramCollection != null ? !paramCollection.equals(that.paramCollection) : that.paramCollection != null)
            return false;
        if (paramName != null ? !paramName.equals(that.paramName) : that.paramName != null) return false;
        if (siteName != null ? !siteName.equals(that.siteName) : that.siteName != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result;
        long temp;
        result = stepId.hashCode();
        result = 31 * result + glassId.hashCode();
        result = 31 * result + glassEndTime.hashCode();
        result = 31 * result + paramCollection.hashCode();
        result = 31 * result + paramName.hashCode();
        result = 31 * result + siteName.hashCode();
        result = 31 * result + (int) (seqNo ^ (seqNo >>> 32));
        result = 31 * result + (int) (vd ^ (vd >>> 32));
        temp = Double.doubleToLongBits(vg);
        result = 31 * result + (int) (temp ^ (temp >>> 32));
        temp = Double.doubleToLongBits(id);
        result = 31 * result + (int) (temp ^ (temp >>> 32));
        return result;
    }
}
